<extend name="template/base_index" />


<block name="area_header">

	<link rel="stylesheet" type="text/css" media="all" href="__CDN__/jquery-datetimepicker/jquery.datetimepicker.css">
	<script type="text/javascript" src="__CDN__/jquery-datetimepicker/jquery.datetimepicker.js"></script>
	
</block>

<block name="area_body">
	{:W('Menus/topbar')}
	<div class="admin-main container-fluid">
		{:W('Menus/left')}
		<div class="admin-main-content">
			{:W('Menus/breadcrumb')}
			<!-- 过滤\查询按钮 -->
				<div class="filter-controls">
					<!-- 日期查询 -->
					<form action="{:U('Admin/Post/index')}" method="post" class="form-inline">
                        <div class="form-group">
                            <div class="input-group">
                                <div class="input-group-addon">
                                    文章类别
                                </div>
                                <select name="cate" class="form-control" >
                                    <option value="">=全部=</option>
                                    <volist name="article_cates" id="vo">
                                        <option <eq name="vo['id']" value="$cur_cate">selected</eq> value="{$vo.id}">{$vo.name}</option>
                                    </volist>
                                </select>
                            </div>
                        </div>
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									文章标题
									<i class="fa fa-calendar"></i>
								</div>
								<input type="text" name="name" id="enddatetime" class="form-control input-short" value="{$name}" />
							</div>
						</div>
						<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-search"></i>{:L('BTN_SEARCH')}</button>
					</form>
				</div>
				<!-- 操作按钮 -->
				<div class="btn-controls">
					<a class="btn btn-primary btn-sm" href="{:U('Admin/Post/add')}"><i class="fa fa-plus"></i>{:L('BTN_ADD')}</a>
					<!--<a target-form="selectitem" class="btn btn-danger btn-sm ajax-post confirm" href="{:U('Admin/Post/bulkDelete')}"><i class="fa fa-trash"></i>{:L('BTN_DELETE')}</a>
					-->
				</div>

				<table class="table table-striped table table-hover  table-condensed">
					<thead>
						<tr>
							<th>
								<input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');" />
							</th>
							<th style="width: 240px;">
								文章标题
							</th>
                            <th>
                                文章作者
                            </th>
                            <th>
                                类别
                            </th>
                            <th>
                                添加时间
                            </th>
                            <th>
                                在线时间
                            </th>
                            <th>
                                文章状态
                            </th>
							<th>
								操作
							</th>
						</tr>
					</thead>
					<tbody>
						<empty name="list">
							<tr>
								<td colspan="7" class="text-center">{:L('NO_DATA')}</td>
							</tr>
							<else/>
							<volist name="list" id="vo">
								<tr>
									<td>
										<input type="checkbox" value="{$vo.id}" name="ids[]" class="selectitem" /></td>
                                    <td>
                                        {$vo.post_title}
                                    </td>
                                    <td>
                                        {$vo.post_author_name}
                                    </td>
                                    <td>
                                        {$vo.post_cate_name}
                                    </td>
									<td>
										{$vo.post_date|date='Y-m-d h:i:s',###}
									</td>
                                    <td>
                                        {$vo.start_time|date='Y-m-d h:i:s',###}-
                                        {$vo.end_time|date='Y-m-d h:i:s',###}
                                    </td>
                                    <td>
                                        <span style="color: #FFF5D4;" class="bg-info padding-sm">{:($vo['post_status'] == "publish"?"已经发布":"还未发布")}</span>
                                    </td>
									<td>
										<a href="{:U('Cms/Post/view',array('id'=>$vo['id']))}" target="_blank" class="btn btn-sm btn-primary"><i class="fa fa-eye"></i>查看</a>
										<a href="{:U('Admin/Post/edit',array('id'=>$vo['id']))}" class="btn btn-sm btn-default"><i class="fa fa-edit"></i>编辑</a>
										<a href="{:U('Admin/Post/delete',array('id'=>$vo['id']))}" class="ajax-get confirm btn btn-sm btn-danger"><i class="fa fa-trash"></i>删除</a>
									</td>
								</tr>

							</volist>
						</empty>
					</tbody>
				</table>
				<div>{$show}</div>
			</div>

		</div>
		<!-- END admin-main-content -->
	</div>
		<!-- END admin-main-->
</block>

<block name="area_footer">

</block>